<template>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" title="自定义字段" :append-to-body="true" :visible="modalEdit" @close="modalEdit=false" @opened="opened" @closed="closed">

        <jsonView :data="text" />
        <div slot="footer">
            <el-button @click="cancel">取消</el-button>
            <el-button type="primary" @click="ok">确定</el-button>
        </div>
    </el-dialog>
    </div>
</template>
<script>
import jsonView from 'vue-json-views'
export default {
    name: 'CustomerAddress',
    data() {
        return {

            modalEdit: false,

            text: {},
            rules: {

            }
        };
    },
    mounted: function() {


    },
    components:{
        jsonView
    },
    methods: {

        opened() {



        },
        closed: function() {
            this.text = {};
        },
        showDialog(txt) {
           
            this.text = txt;
            this.modalEdit = true;
        },

        ok: function() {

            this.modalEdit = false;

        },
        cancel: function() {
            this.customerAddress = {};
            this.modalEdit = false;
            this.$emit("cancel");
        }
    }
}
</script>
<style scoped>
</style>